import request from '~/utils/request'
const qs = require('qs')

export const login = (user) => {
  const data = user
  const url = '/user/login'
  return request({
    url: url,
    method: 'post',
    data: qs.stringify(data)
  })
}

export const getUserInfo = () => {
  return request({
    url: '/user/userInfo',
    method: 'get'
  })
}

export const register = (data) => {
  return request({
    url: '/user/register',
    method: 'post',
    data: qs.stringify(data)
  })
}
